package com.file.system.mapper.system;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.file.system.entity.system.WebDictionaryVal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* 字典值 Mapper 接口
* @author jch
* @since 2022-07-27
*/
@Mapper
public interface WebDictionaryValMapper{

    //添加字典值
    int save(WebDictionaryVal webDictionaryVal);

    //编辑字典值
    int update(@Param("ew") UpdateWrapper<WebDictionaryVal> query);

    //编辑字典值
    int updateById(WebDictionaryVal webDictionaryVal);

    //添加字典值(批量)
    int saveBatch(@Param("list") List<WebDictionaryVal> webDictionaryValList);

    //通过id查询字典值
    WebDictionaryVal selectById(@Param("id") Long id);

    //查询字典值
    List<WebDictionaryVal> select(@Param("ew") QueryWrapper<WebDictionaryVal> query);

    //查询字典值分页
    List<WebDictionaryVal> select(Page<WebDictionaryVal> page, @Param("ew") QueryWrapper<WebDictionaryVal> query);

    //查询字典值数量
    int selectCount(@Param("ew") QueryWrapper<WebDictionaryVal> query);

    //删除字典值
    int removeById(WebDictionaryVal webDictionaryVal);
}
